<template>
  <el-dialog
      title="上传个人照片"
      v-model="uploadPhotoDialog"
      :width="300"
      center>
    <div style="display: flex;
              justify-content: center;
              align-items: center;">
      <el-upload
          accept=".jpeg,.png,.jpg"
          :before-upload="checkFileType"
          class="avatar-uploader"
          :width="140"
          style="  border: 1px dashed #d9d9d9;
                    border-radius: 6px;
                    cursor: pointer;
                    position: relative;
                    overflow: hidden;"
          :action="serverIp() + '/api/info_account/uploadPhoto'"
          :headers="this.headerObject"
          :show-file-list="false"
          :on-success="handleAvatarSuccess">
        <div style="width: 140px;height:195px">
          <img width="140" height="195" v-if="imageUrl!==photoIp()+'null'" :src="imageUrl" class="avatar">
        </div>
      </el-upload>
    </div>
  </el-dialog>
</template>
<script setup lang="ts">

</script>

<style scoped>

</style>